#ifndef _RTOS_LED_H_  
#define _RTOS_LED_H_ 

	/**
	 * \file led.h
	 * \brief Constants and functions for controlling LEDs on a AT90USBKey
	 * \author Clecio Varjao and Leanne Ross
	 * \date October 2007
	 */

	#include <avr/io.h>

	#define LED_D2_GREEN	(1<<PORTD5)
	#define LED_D2_RED		(1<<PORTD4)
	#define LED_D5_GREEN	(1<<PORTD6)
	#define LED_D5_RED		(1<<PORTD7)
	#define LED_D2			(LED_D2_GREEN | LED_D2_RED)
	#define LED_D5			(LED_D5_GREEN | LED_D5_RED)

	inline void blink_led(unsigned int mask);
	inline void blink_led_for(unsigned int mask, unsigned int miliseconds);
	inline void enable_led(unsigned int mask);
	inline void disable_led(unsigned int mask);

	inline void init_leds(void);
	inline void disable_leds(void);

#endif /* _RTOS_LED_H_ */
